import React, {Component} from 'react'
import ReactDOM from 'react-dom'
import {anotherModel, Model}  from './index.data'
import {onclick} from './index.action'
import Button from '../components/Standard/Button/index'

class App extends Component {
    constructor(props){
        super()
        this.state = {
            anotherModel,
            Model
        }
    }
    render() {
        const { anotherModel, Model} = this.state
        return (
            <div>
                <div className="container">
                    <div className="row">
                        <div className="col-xl-12">
                            <Button id={"IDbutton"} onClick={onclick.bind(this,Model,anotherModel)}>{anotherModel.age}</Button>
                            <Button id={"IDbutton2"}>{Model.age}</Button>
                        </div>
                    </div>
                </div>
            </div>
        )
    }
}
ReactDOM.render(
    <App></App>,
    document.getElementById('root'),
)
